//
//  UIAlertController+Extend.m
//  TaiHao
//
//  Created by rzm on 16/6/1.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "UIAlertController+Extend.h"

@implementation UIAlertController (Extend)
+ (UIAlertController *)showAlertControllerSheet:(NSString *)title message:(NSString *)message cancel:(NSString *)cancelButtonTitle other:(NSString *)otherButtonTitle
{
    
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
    
    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
        NSLog(@"The \"Okay/Cancel\" alert's cancel action occured.");
    }];
    
    UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        NSLog(@"The \"Okay/Cancel\" alert's other action occured.");
    }];
    
    // Add the actions.
    [alertController addAction:cancelAction];
    [alertController addAction:otherAction];
    
    return alertController;
}
@end
